package com.xing.Order.Entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.xing.User.Entity.User;
@Entity
@Table(name="T_ORDER")
public class Order implements Serializable {
	/**
	 * 序列化 随机生成 作为标识存在，用来在缓存中找回
	 */
	private static final long serialVersionUID = 4581469810384728096L;
	@Id
	@GeneratedValue
	@Column(name="orderid",nullable=false)
	private String orderid;
	@Column
	private String address;
	@Column
	private String carno;
	@Column
	private String phoneno;
	@Column
	private String explain;
	@Column
	private String time;
	@Column
	private String status;
	@Column
	private String del;
	//�ӳټ��ػ�����Ϊ�˱���һЩ��ν�����ܿ�����������ģ���ν�ӳټ��ؾ��ǵ���������Ҫ���ݵ�ʱ�򣬲�����ִ�����ݼ��ز�����
	@ManyToOne(cascade={CascadeType.ALL},fetch=FetchType.EAGER)           
	@JoinColumn(name="userid")  //Order���ж�Ӧ��������ԣ�userid   
	private User user;
	public String getOrderid() {
		return orderid;
	}
	public void setOrderid(String orderid) {
		this.orderid = orderid;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getCarno() {
		return carno;
	}
	public void setCarno(String carno) {
		this.carno = carno;
	}
	public String getPhoneno() {
		return phoneno;
	}
	public void setPhoneno(String phoneno) {
		this.phoneno = phoneno;
	}
	public String getExplain() {
		return explain;
	}
	public void setExplain(String explain) {
		this.explain = explain;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	
	
}
